package com.ljx.itbbs.server.article.service.impl;

import com.ljx.itbbs.server.article.dao.ArticleTagRelationDao;
import com.ljx.itbbs.server.article.service.ArticleTagRelationService;
import com.ljx.itbbs.server.article.service.adapter.ArticleAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleTagRelationServiceImpl implements ArticleTagRelationService {

    @Autowired
    private ArticleTagRelationDao articleTagRelationDao;

    @Override
    public void save(Long id, Long articleId) {
        articleTagRelationDao.save(ArticleAdapter.buildArticleTagRelationSave(id, articleId));
    }

    @Override
    public void deleteArticleTagRelation(Long articleId) {
        articleTagRelationDao.deleteArticleTagRelation(articleId);
    }
}
